<template>
  <div id="Detail">
    <v-details
      :detailData="data.detailData"
      :inputConfig="inputConfig"
      :rules="rules"
    ></v-details>
  </div>
</template>

<script>
import details from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
  name: "Detail",
  mixins: [baseMixin],
  props: {
    data: {
      type: Object,
    },
  },
  data() {
    return {
      whseidflag: false,
      rules: {},
    };
  },
  computed: {
    inputConfig() {
      return [
        [
          {
            type: "input",
            label: this.$t("config.sequence"),
            props: "seq",
            disabled: true,
          },
        ],
        [
          {
            type: "",
            label: this.$t("config.batchProp", { no: "01" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "02" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "03" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "04" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "05" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "06" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "07" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "08" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "09" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "10" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "11" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "12" }),
            props: "",
            disabled: true,
          },
        ],
        [
          {
            type: "checkbox",
            label: this.$t("outbound.lottable01receiptvalidation"),
            props: "lottable01receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable03receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable04receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable04receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable05receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable06receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable07receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable08receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable09receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable10receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable11receiptvalidation",
            disabled: this.whseidflag,
          },
          {
            type: "checkbox",
            label: " ",
            props: "lottable12receiptvalidation",
            disabled: this.whseidflag,
          },
        ],
        [
          {
            type: "select",
            label: this.$t("outbound.lottable01dateformat"),
            props: "lottable01dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable02dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable03dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "input",
            label: " ",
            props: "",
            disabled: this.whseidflag,
          },
          {
            type: "input",
            label: " ",
            props: "",
            disabled: this.whseidflag,
          },
          {
            type: "select",
            label: " ",
            props: "lottable06dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable07dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable08dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable09dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable10dateformat",
            disabled: this.whseidflag,
            options: this.getOptions("queryDateformatDropDown"),
          },
        ],
        [
          {
            type: "select",
            label: this.$t("outbound.lottable01receiptconversion"),
            props: "lottable01receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable02receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable03receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "input",
            label: " ",
            props: "",
            disabled: this.whseidflag,
          },
          {
            type: "input",
            label: " ",
            props: "",
            disabled: this.whseidflag,
          },
          {
            type: "select",
            label: " ",
            props: "lottable06receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable07receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable08receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable09receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
          {
            type: "select",
            label: " ",
            props: "lottable10receiptconversion",
            disabled: this.whseidflag,
            options: this.getOptions("querycodeLkup/LOTCONPROC"),
          },
        ],
      ];
    },
  },
  methods: {},
  mounted() {
    if (this.$store.state.wms.toUpperCase().includes("WMWHSE")) {
      //仓库级
      this.whseidflag = true;
    }
  },
  watch: {},
  components: {
    "v-details": details,
  },
};
</script>

<style scoped></style>
